#include "bullet_boss1.h"
#include <shuju.h>

bullet_boss1::bullet_boss1()
{
    Bullet.load(":/pic/res/zidan2.png");

    bspeed = 2;
    //边框
    b_Rect.setWidth(Bullet.width());
    b_Rect.setHeight(Bullet.height());
    b_Rect.moveTo(b_x , b_y);
    b_x = -100;
    b_y = -100;
    b_free = 1;
}

void bullet_boss1::updatePosition()
{
    if(b_free)
    {
        return;
    }
    //子弹位移
    b_x += bspeed*0.5;
    b_y += bspeed;
    b_Rect.moveTo(b_x , b_y);
    if(b_y >= sence_h)
    {
        b_free = 1;

    }
}
